<div class="bjui-pageHeader">
    <div class="glyphicon glyphicon-th-large">模型列表</div>
        <button type="button" class="btn  btn-default" data-toggle="dialog" data-id="mydialog2" data-url="{:U('Model/add')}" data-title="添加模型" data-width="600" data-height="400">添加模型</button>
</div>

<div class="bjui-pageContent">


    <form action="{:U('Model/sort')}" data-toggle="validate">
        <table class="table table-bordered table-hover table-striped table-top" >
            <thead>
            <tr>
                <th><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
                <th>编号</th>
                <th>名称</th>
                <th>附加表</th>
                <th>启用</th>
                <th>排序</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name='vlist' item='v'>
            <tr data-id="{$v.id}">
                <td><input type="checkbox" name="ids" data-toggle="icheck" value="{$v.id}"></td>
                <td>{$v.id}</td>
                <td>{$v.name}</td>
                <td>{$v.tablename}</td>
                <td><if condition="$v['status']">是<else/>否</if></td>
                <td><input type="text" name="{$v.id}" value="{$v.sort}" /></td>
                <td>
                <if condition="($v.tablename eq 'page') OR ($v.tablename eq 'download')">
                    系统内置模型不可更改
                <else/>
                <a href="{:U('Model/edit', array('id' => $v['id']))}" data-toggle="navtab" data-id="model-edit" data-title="修改模型">修改</a>
                <a href="{:U('Model/fieldset', array('id' => $v['id']))}" data-toggle="navtab" data-id="model-fieldset" data-title="字段管理">字段管理</a>
                <a href="{:U('Model/del', array('id' => $v['id']))}" data-toggle="doajax" data-confirm-msg="确定要删除吗？" data-type="get">删除</a>
                </if>
                </td>
            </tr>
            </tbody>
            </foreach>
        </table>
        <div class="th" style="clear: both;"> </div>
    </form>

</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
        <li><button data-icon="save" class="btn btn-default" type="submit">排序</button></li>
    </ul>
</div>